/*
 * @Descripttion: unTitle
 * @Author: yizheng.yuan
 * @Date: 2019-08-13 10:29:27
 * @LastEditors: yizheng.yuan
 * @LastEditTime: 2021-11-10 18:40:26
 */
const path = require('path')
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports={
    entry:'./src/lib/index.js',
    output:{
        path: path.join(__dirname, 'dist/'),
        filename:'vue2toast2my.js',
        libraryTarget:'umd',
        library:'VueToastDemo'
    },
    module:{
        rules:[
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            },
            {
              test: /\.js$/,
              exclude: /(node_modules|bower_components)/,
              use: {
                loader: 'babel-loader',
                options: {
                  presets: ['@babel/preset-env']
                }
              }
            },
            {
                test: /\.scss$/,
                use: [
                  'vue-style-loader',
                  'css-loader',
                  {
                    loader: 'sass-loader',
                    // global data for all components
                    // this can be read from a scss file
                    options: {
                      data: '$color: red;'
                    }
                  }
                ]
            }
        ]
    },
    plugins: [
        new VueLoaderPlugin()
    ]
   
}